package com.zzq.my.jetpacks.jectpackapp.ui.act

import androidx.recyclerview.widget.GridLayoutManager
import by.kirich1409.viewbindingdelegate.viewBinding
import com.aisier.architecture.base.BaseActivity
import com.zzq.my.jetpacks.jectpackapp.R
import com.zzq.my.jetpacks.jectpackapp.adapter.RvMenuItemAdapter
import com.zzq.my.jetpacks.jectpackapp.databinding.ActivityRecyleviewGriveMenuBinding
import com.zzq.my.jetpacks.jectpackapp.databinding.ItemSwipedelmenuBinding
import com.zzq.my.jetpacks.jectpackapp.utils.ABPixelUtil
import com.zzq.my.jetpacks.jectpackapp.view.decoration.MyDividerItem
import com.zzq.my.jetpacks.util.showMsg

/**
 * 描述：侧滑删除之SwipeDelMenuLayout
 * 作者：zhuangzeqin
 * 时间: 2022/1/18-17:04
 * 邮箱：zzq@eeepay.cn
 * 备注:
 */
class SwipeDelMenuLayoutAct : BaseActivity(R.layout.item_swipedelmenu) {
    private val vb by viewBinding(ItemSwipedelmenuBinding::bind)


    /**
     * 初始化数据
     */
    override fun initData() {


    }

    /**
     * 初始化操作
     */
    override fun initView() {

    }

    /**
     * 初始化点击事件操作
     */
    override fun eventOnClick() {

        vb.btnDelete.setOnClickListener {
            showMsg("删除")
//            vb.swipeMenuLayout.quickClose()
        }
    }

//    /**
//     * 将RecyclerView的网格布局中的某个item设置为独占一行、只占一列，只占两列、等等
//     * @param gridLayoutManager
//     */
//    private void setSpanCount(GridLayoutManager gridLayoutManager){
//        gridLayoutManager.setSpanSizeLookup(new GridLayoutManager.SpanSizeLookup() {
//            @Override
//            public int getSpanSize(int position) {
//                int type = getItemViewType(position);
//                if (type == TYPE_NORMAL_ITEM) {
//                    return 1;//只占一行中的一列，
//                } else {
//                    return gridLayoutManager.getSpanCount();//独占一行
//                }
//            }
//        });
//    }

}